<extend name="Order/personalEdit"/>
<!-- 清空头部广告 -->
<block name="ad_top"></block>

<block name='content'>
	<include file="Public/assets_header"/>
		<!--内容-->
		<div class="mordrMain fr punke-content-wrap">
			<div class="title clearfix">
				<ul class="clearfix fl">
					<li class="fl active hover"><a href="javascript:;">积分兑换</a></li>
				</ul>
				<dl class="clearfix fr nav">
					<dt class="fl">按分值浏览</dt>
					<dd class="fl"><a href="{:U('Assets/punkte_ajax',array('flag'=>1))}">0-1000</a></dd>
					<dd class="fl"><a href="{:U('Assets/punkte_ajax',array('flag'=>2))}">1000-2000</a></dd>
					<dd class="fl"><a href="{:U('Assets/punkte_ajax',array('flag'=>3))}">2000-3000</a></dd>
					<dd class="fl"><a href="{:U('Assets/punkte_ajax',array('flag'=>4))}">3000-5000</a></dd>
					<dd class="fl"><a href="{:U('Assets/punkte_ajax',array('flag'=>5))}">5000-10000</a></dd>
					<dd class="fl"><a href="{:U('Assets/punkte_ajax',array('flag'=>6))}">10000-20000</a></dd>
					<dd class="fl none"><a href="{:U('Assets/punkte_ajax',array('flag'=>7))}">20000及以上</a></dd>
				</dl>
			</div>
			<ul class="content-main clearfix">
			    <volist name="data" id="vo">
					<li class="fl">
						<div class="screenshot">
							<img src="__SERVER__{$vo.images}">
						</div>
						<div class="products-description">
							<p>{$vo.title|substr=0,81}</p>
							<span>{$vo.integral} 积分</span>
						</div>
						<div class="products-operation clearfix">
							<input type="button" value="立即兑换" class="fl search-btn" data-value="{:U('IntegralMall/cart',array('goods_id'=>$vo['goods_id']))}">
						</div>
					</li>
				</volist>
			</ul>
		</div>
		<div class="page">{$page}</div>
		<!--右侧一键到顶 and 客服-->
		<include file="Order/personalHomeTop"/>
	</div>
	<!--尾部-->
	
<!-- <script src="__JS__/header.js"></script> -->
<script src="__JS__/Calendar.js"></script>
<script>
	;(function(){
		function cutstr(str,len){
		   var str_length = 0;
		   var str_len = 0;
		      str_cut = new String();
		      str_len = str.length;
		      for(var i = 0;i<str_len;i++){
		        a = str.charAt(i);
		        str_length++;
		        if(escape(a).length > 4){
		         str_length++;
		         }
		         str_cut = str_cut.concat(a);
		         if(str_length>=len){
		         str_cut = str_cut.concat("...");
		         return str_cut;
		         }
		    }
		    if(str_length<len){
		     return  str;
		    }
		}
		var aLi = $('.mordrMain .content-main li');
		var aCon = $('.mordrMain .content-main li .products-description p');
		var str = '';
		aLi.each(function(index,obj){
			str = $(aCon).eq(index).html();
			$(aCon).eq(index).html(cutstr(str,56));
		});
	})();
	// 添加到积分购物车
	$('.punke-content-wrap .content-main li .products-operation').on('click',' .search-btn',function(){
		var href = $(this).attr('data-value');
		window.location.href = href;
	})
</script>
</block>